import request from '@/utils/request'
import { config } from '@/utils/requestconfig'

// /取用户菜单和元素
export function getMessages(params) {
  return request({
    baseURL: config.webapi,
    url: '/message/GetMessages',
    method: 'get',
    params
  })
}
export function getMessageUnreadCount() {
  return request({
    baseURL: config.webapi,
    url: '/message/GetMessageUnreadCount',
    method: 'get'
  })
}

export function readAll() {
  return request({
    baseURL: config.webapi,
    url: '/message/ReadAll',
    method: 'Post'
  })
}
export function deleteAll() {
  return request({
    baseURL: config.webapi,
    url: '/message/DeleteAll',
    method: 'Post'
  })
}
export function deleteMessage(data) {
  return request({
    baseURL: config.webapi,
    url: '/message/DeleteMessage',
    method: 'Post',
    data
  })
}
export function readMessage(data) {
  return request({
    baseURL: config.webapi,
    url: '/message/ReadMessage',
    method: 'Post',
    data
  })
}
